package com.usf.jprovider.tools;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public final class CSVTools {

	public static String columnValues(String path, int column, String colsep, int rowStart) throws IOException {
		BufferedReader reader = new BufferedReader(new FileReader(path));
		StringBuffer values = new StringBuffer();
		String line;
		int cp = 0;
		while(cp < rowStart && reader.readLine() != null) cp++;
		while((line = reader.readLine()) != null){
			values.append(line.split(colsep)[column]);
			values.append(colsep);
		}
		reader.close();
		return values.toString();
	}
	
}
